#ifndef GENOMEELEMENT_H
#define GENOMEELEMENT_H

#include <QObject>
#include <QDebug>
#include <QPointer>

#include "../../sagevis.h"
#include "../../VisBaseClasses/visbaseelement.h"
#include "BaseDataManagement/genomeelementdatapacket.h"
#include "../../VisBaseClasses/visbasewidget.h"
#include "multigeneregionviswidget.h"

class SageVis;
class VisBaseElement;
class GenomeElementDataPacket;
class VisBaseWidget;

class GenomeElement : public VisBaseElement
{
    Q_OBJECT
public:
    explicit GenomeElement(QPointer<SageVis> sageVisPointer, MultiGeneRegionVisWidget* parentWidget, QGraphicsItem *parent = 0);
    explicit GenomeElement(QPointer<GenomeElementDataPacket> dataPacket, QPointer<SageVis> sageVisPointer, MultiGeneRegionVisWidget* parentWidget, QGraphicsItem *parent = 0);

    typedef VisBaseElement super;

    void setDataPacket( QPointer<GenomeElementDataPacket> dataPacket );

    int getStart();
    int getStop();

    //PAINT FUNCTIONS
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
               QWidget *widget);

signals:
    
public slots:


private:
    QPointer< GenomeElementDataPacket > dataPacket;

    void init();

    QColor defaultColor;
    QColor givenColor;
    QColor highlightColor;

    bool drawArrow;
    bool drawForward;

    void processHoverEvent(QGraphicsSceneHoverEvent *event);
};

#endif // GENOMEELEMENT_H
